<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Food/Fproductattribute.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/Food/Fproductattribute.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "attribute_id",
        footer: "Foots",
        cnName: "属性配置",
        name: "Fproductattribute",
        url: "/Fproductattribute/",
        sortName: "attribute_id",
      },
      extend: extend,
      editFormFields: {
        supplierCode: "",
        attribute_name: "",
        attribute_value: "",
        sort: "",
      },
      editFormOptions: [
        [
          {
            dataKey: "mall_supplier",
            data: [],
            title: "供应商名称",
            required: true,
            field: "supplierCode",
            type: "select",
          },
        ],
        [
          {
            title: "属性名",
            required: true,
            field: "attribute_name",
            type: "text",
          },
        ],
        [
          {
            title: "属性值",
            required: true,
            field: "attribute_value",
            type: "text",
          },
        ],
        [{ title: "排序", field: "sort", type: "number" }],
      ],
      searchFormFields: { attribute_name: "" },
      searchFormOptions: [
        [{ title: "属性名", field: "attribute_name", type: "text" }],
      ],
      columns: [
        // {field:'attribute_id',title:'ID',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
        {
          field: "attribute_name",
          title: "属性名",
          type: "string",
          width: 120,
          require: true,
          align: "left",
          sortable: true,
        },
        //  {field:'attribute_value',title:'属性值',type:'string',width:90,require:true,align:'left'},
        { field: "sort", title: "排序", type: "int", width: 90, align: "left" },
        //  {field:'app_id',title:'应用id',type:'int',width:90,align:'left'},
        {
          field: "supplierCode",
          title: "供应商",
          type: "string",
          width: 120,
          align: "left",
          bind: {
            key: "mall_supplier",
            data: [],
          },
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 80,
          align: "left",
        },
        //  {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 190,
          align: "left",
          sortable: true,
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 80,
          align: "left",
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 190,
          align: "left",
          sortable: true,
        },
        //  {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
        //  {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
        //  {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
